<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en"  xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
		<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
		<meta content="" name="description">
		<meta content="" name="author">

		<title>部门列表</title>
		<!-- Bootstrap core CSS -->
		<link rel="stylesheet" th:href="@{/css/bootstrap.min.css}">
		<!-- Custom styles for this template -->
		<link rel="stylesheet" th:href="@{/css/dashboard.css}">
		<style type="text/css">
			/* Chart.js */
			
			@-webkit-keyframes chartjs-render-animation {
				from {
					opacity: 0.99
				}
				to {
					opacity: 1
				}
			}
			
			@keyframes chartjs-render-animation {
				from {
					opacity: 0.99
				}
				to {
					opacity: 1
				}
			}
			
			.chartjs-render-monitor {
				-webkit-animation: chartjs-render-animation 0.001s;
				animation: chartjs-render-animation 0.001s;
			}
		</style>
	</head>

	<body>
		<div th:replace="~{common/common::topbar}"></div>

		<div class="container-fluid">
			<div class="row">
				<div th:replace="~{common/common::siderbar(active='deplist')}"></div>
					<main class="col-md-9 ml-sm-auto col-lg-10 pt-3 px-4" role="main">
						<h2>部门列表</h2>
						<div class="table-responsive">
							<a class="btn btn-success" th:href="@{/dep/add}">添加部门</a>
							<table class="table table-striped table-sm">
								<thead>
								<tr>
									<th>部门id</th>
									<th>部门名称</th>
									<th>操作</th>
								</tr>
								</thead>
								<tbody>
								<tr th:each="dep:${deps}">
									<td th:text="${dep.getDepartmentId()}"></td>
									<td th:text="${dep.getDepartmentName()}"></td>
									<td>
										<a class="btn btn-sm btn-primary" th:href="@{/dep/update/}+${dep.getDepartmentId()}">修改</a>
										<a class="btn btn-sm btn-danger" th:href="@{/dep/remove/}+${dep.getDepartmentId()}">删除</a>
									</td>
								</tr>
								</tbody>
							</table>
						</div>
					</main>
			</div>
		</div>

		<!-- Bootstrap core JavaScript
    ================================================== -->
		<!-- Placed at the end of the document so the pages load faster -->
		<script th:src="@{/js/jquery-3.2.1.slim.min.js}" type="text/javascript"></script>
		<script th:src="@{/js/popper.min.js}" type="text/javascript"></script>
		<script th:src="@{/js/bootstrap.min.js}" type="text/javascript"></script>

		<!-- Icons -->
		<script th:src="@{/js/feather.min.js}" type="text/javascript"></script>
		<script>
			import {feather} from "../../static/js/feather.min";
			feather.replace()
		</script>

		<!-- Graphs -->
		<script th:src="@{/js/Chart.min.js}" type="text/javascript"></script>
		<script>
			var ctx = document.getElementById("myChart");
			var myChart = new Chart(ctx, {
				type: 'line',
				data: {
					labels: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
					datasets: [{
						data: [15339, 21345, 18483, 24003, 23489, 24092, 12034],
						lineTension: 0,
						backgroundColor: 'transparent',
						borderColor: '#007bff',
						borderWidth: 4,
						pointBackgroundColor: '#007bff'
					}]
				},
				options: {
					scales: {
						yAxes: [{
							ticks: {
								beginAtZero: false
							}
						}]
					},
					legend: {
						display: false,
					}
				}
			});
		</script>

	</body>

</html>